You also can use an hsla variant to include alpha.Įdited: and here is part two about transparency. and modify the third color for darker colors, and the second and third for lighter ones. ![]() The RGB values are not the same of my text, just because a lazy work, but you can see that the orange "stairs" retain its intrinsect proportions. I am adding an image to give you the basic idea. ![]() You can not augment R anymore, and you can not increase the Green and the blue with the same values, for example 100 more, because you will haveġ) The difference from 255 to the current value (R255 G128 B0) is: R0 G127 B255Ĥ) Add that to your initial value: R255+0 G128+64 B0+128 = R255 G192 B128. To make one color lighter the idea is pretty much the same, But it is more tricky because the colors will cap at 255, so you can think on the diference between the 255 to your values. ![]() This will give you R128 G64 B0 Notice that all colors were modified using a proportional scale.Ī more complex color could be R255 G200 B100 Let us darken it but not as much as the previous case. If you want a darker color you need to reduce the values for example at 50% I will use a scale in numbers, not with letters, so we can see the math behind it. ![]() To work with hexadecimal values you need to think in terms of relative proportion of the RGB values.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |