Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradient text color

Is there a generator , or an easy way to generate text like this but without having to define every letter

So something like this:

.rainbow {    background-image: -webkit-gradient( linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) );    background-image: gradient( linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) );    color:transparent;    -webkit-background-clip: text;    background-clip: text;  }
<span class="rainbow">Rainbow text</span>

But not with rainbow colors but generate with other colors (for example white to grey/light blue gradient etc) I can't find an easy solution for this. Any solutions?

like image 394
StabDev Avatar asked Jun 15 '16 09:06

StabDev


People also ask

Can I use linear gradient for text color?

For example color: linear-gradient(yellow, red) won't work. But gradient text can be achieved in CSS, it just requires a few extra steps. It's best to start with some big bold text. This will make the gradient more visible and the text more readable.

How do I color my text gradient in Word?

To add a gradient effect to text, select the text, then on the Font group of the Home tab, click the arrow next to the font color button. At the bottom of the dropdown, select Gradient. The same Gradient options are available in many other Word and Office objects like borders and shapes.


1 Answers

I don't exactly know how the stop stuff works. But I've got a gradient text example. Maybe this will help you out!

_you can also add more colors to the gradient if you want or just select other colors from the color generator

.rainbow2 {      background-image: -webkit-linear-gradient(left, #E0F8F7, #585858, #fff); /* For Chrome and Safari */      background-image:    -moz-linear-gradient(left, #E0F8F7, #585858, #fff); /* For old Fx (3.6 to 15) */      background-image:     -ms-linear-gradient(left, #E0F8F7, #585858, #fff); /* For pre-releases of IE 10*/      background-image:      -o-linear-gradient(left, #E0F8F7, #585858, #fff); /* For old Opera (11.1 to 12.0) */      background-image:         linear-gradient(to right, #E0F8F7, #585858, #fff); /* Standard syntax; must be last */      color:transparent;      -webkit-background-clip: text;      background-clip: text;  }  .rainbow {      background-image: -webkit-gradient( linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) );    background-image: gradient( linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) );    color:transparent;    -webkit-background-clip: text;    background-clip: text;  }
<span class="rainbow">Rainbow text</span>  <br />  <span class="rainbow2">No rainbow text</span>
like image 130
Angel ofDemons Avatar answered Sep 20 '22 08:09

Angel ofDemons