How remove background from an image work? - web-frontend

When building my website, i faced an image with some text in it.
But the text only display when i changed background-color to black.
After some research, i think ít's a transparent image, and we have some online tools to replace background image.
Anyone know how remove background from an image really work ?
And why it make the text showed up ?
This is my image.
updated: Sorry, my question is not clear. Here is my code
https://codepen.io/ging2507/pen/wvWJeyR
when i remove comment of navbar, the Text of image show up(not the normal text 123131). And i dont know why this happened
.navbar {
background-color: #14425D;
}

The image doesn't change at all. It just has some pixels that are marked as transparent.
Consider a sheet of glass. Paint on it using white paint. Put it on a sheet of white paper. Now you can't see what was painted on it. Replace the white paper with black paper. Not you can see what was painted on it.

I am not sure if I understand your question correctly. You have an image that you want to remove the grey background from? I have tried to use this tool and this is the following output that I got. The text cannot be read since it is it white and blends together with the background. I hope this helped
Edit: The tool that I have posted can also replace the background as you can see here
EDIT
You can also use CSS to add background to the image.
I have mananged to add linear gradient to the image using CSS. You can see the code
.logo {
background: linear-gradient(
105deg,
rgba(34, 193, 195, 1) 0%,
rgba(253, 187, 45, 1) 100%
);
}
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=">
<title></title>
</head>
<body>
<img src="https://i.stack.imgur.com/Pawab.png" alt="some logo" class="logo">
</body>
</html>
Here is a link to codepen if you want to play around with it.

Related

Jenkins console output gray backgorund after update

We have just updated our jenkins (2.337) and the python console output has gone weird:
I've searched the jenkins settings (ANSI plugin etc) and I can change the inner colours but the gray background and line breaks remain. Does anyone know the settings to get it back to the plain old black and white it used to be?
We had a similar problem ... we had an almost Black Background with Black Text
We found that the Extra CSS in the Theme section of the Jenkins Configuration has changed.
After putting it through a code formatter (there are no new lines or whitespace in the field) we had the following for the console-output:
.console-output .error-inline{
color:#f44336
}
.console-output,.console-output *{
position:relative;
font-family:Roboto Mono,monospace!important;
font-size:14px;
background:#263238;
color:#e9eded;
cursor:text
}
.console-output{
padding:10px 20px
}
The "background:#263238;" was giving the Dark Gray background, while the output didn't specify a colour for the text.
Once I updated the '.console-output' CSS to be:
.console-output{
color:#fff!important;
padding:10px 20px
}
it was all resolved.
Looking at your picture, your console output is going to have a lighter gray background while the text block will be a type specified in your CSS, and will have a darker grey background.
Changing both the have the same colour background will resolve your issue. You could use the HTML Code Examiner (F12 in Chrome) to examine the page setup, and track down exactly which items are giving the look you don't like
When you have broken console colors (black font on black screen) after jenkins update,
Go to Manage Jenkins -> configure system
scroll to theme
click add -> extra CSS
put this in the new field:
.console-output{
color:#fff!important;
}
You can also add any other CSS to please your eye.

latex clickable The whole image

in HTML, we can have a clickable image like this :
<!DOCTYPE html>
<html>
<head>
<title>HTML Image as link</title>
</head>
<body>
<img src="https://www.w3schools.com/html/pic_trulli.jpg">
</body>
</html>
you can click everywhere and you redirect to the website .also in LaTeX, we can have a clickable image like this
\documentclass[10pt,a4paper]{article}
\usepackage{hyperref,graphicx}
\begin{document}
\href{http://www.blog.com}{\includegraphics{blog}}
\end{document}
but the problem is The whole image is not clickable,there is a small point left-hand side it is very small.
i want the image can be clickable like fonts and text all-over the image
\href{http://www.blog.com}{Hello}
\Huge\href{http://www.blog.com}{\faGithub}
my editor is : TeXstudio 4.1.2 (git n/a)
Using Qt Version 5.12.8, compiled with Qt 5.12.8 R
latex compiler is : XeLaTeX
thanks
xelatex does not support non-text hyperlinks. The easiest solution is to use another engine. For example lualatex can do pretty much everything that xelatex can do.
(For the odd case in which changing the engine is not an option, there are workaround for to make non-text elements clickable, see e.g. https://github.com/josephwright/beamer/issues/332#issuecomment-774659976 )

Colors applied via Imagemagick are off from what is expected

I'm trying to set the background of part of an image, to match the colors of other things in a web browser. Somehow the colorspace is different, and the colors don't match when using the same hex or rgb colors.
Example: I use this imagemagick command
convert frog.png -gravity North -background "#83c422" -extent 307x300 newfrog.png
to add a green (#83c422) rectangle to the bottom of an image.
Then I put it in a html page with the background given the same color value:
<html>
<body style="background-color: #83c422">
<img src="newfrog.png">
</body>
</html>
And I get this, where the background color of the page doesn't match the color added to the bottom of the image:
What do I need to do to get the colors to match? Is there some setting for imagemagick to do the colors in the more standard way? (note also that Gimp and various other things all say that the color given to the bottom of the image is not #83c422, but is #93cb2c)
Assuming you have a non-sRGB monitor profile, the problem is that CSS colors still aren't managed in Chrome. Safari has the same issue, AFAIK. Only Firefox (with gfx.color_management.mode = 1) and Opera get it right.

iPad "3" HTML5 Canvas Drawing Resolution

I've been toying around with iPad and HTML5 but since the display is retina, the text on my screen seems to be of low resolution. As do lines drawn with lineTo/moveTo/stroke. Note the text is drawn with context.fillText()
I suspect this is just because I haven't set up the canvas correctly to handle the retina pixel ratio, so hopefully someone here can figure out what exactly I'm doing wrong.
I have set up the canvas as follows:
<div id="container">
<canvas id="canvas"></canvas>
</div>
With CSS attributes:
#canvas {
width: 1024px;
height: 768px;
}
#container {
width: 1024px;
height: 768px;
}
and in JavaScript (as I have seen to do on the internet) I have specified:
canvas.width = 2048;
canvas.height = 1536;
Unfortunately this does not stop the pixelation as it has for some other users.
Am I missing something or have I specified something incorrectly?
Try adding this line to your page head:
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
This tag makes sure that the page is shown in its original size, and remains in that size.

link rollover to change the background image

is there a way to alter a background when you rollover a link? im making a degree show website and want a large sample image to appear in the background when you rollover the link of persons name. i have an image appearing, however its covering all the text and in a fixed position over the link. is there a way to do this so it just alters the background image and stays behind all the other text on the page?
heres what im working with
#hover_img img
{
display:none;
}
#hover_img:hover img
{
display:block;
position:absolute;
top:0px;
padding-top:0px;
}
html
<div id="hover_img">LINK<img src="image" alt="" /></a></div>
thanks!
** fiddle http://jsfiddle.net/5yhsL/ **
Add z-index: -1 to the image on hover:
#hover_img:hover img
{
display:block;
position:absolute;
top:0px;
padding-top:0px;
z-index: -1;
}
You can accomplish this by putting the text inside another element adjacent to your image element. Absolutely positioned elements will take dominance over their neighbors, and one way you can get around that is by assigning a value to the position property for subsequent elements.
Here is a jsfiddle I've whipped up:
http://jsfiddle.net/93mpW/3/

Resources