-2
I need to simplify this hexadecimal code #ff6a00, is there a rule ? has some formula ?
-2
I need to simplify this hexadecimal code #ff6a00, is there a rule ? has some formula ?
2
TL;DR: There’s no way to simplify.
Long version:
#RRGGBB
).#RGB
) this is not possible, since it is the format of the green component (#6a
) cannot be simplified without loss of color resolution. Next versions: #f60
or #f70
.LESS EXAMPLE:
@o: #ff6a00;
#title { color: @o; }
Still, the compiled version will present the full content:
#title { color: #ff6a00; }
1
One way to simplify would be to replace the hexadecimal code of the color by the name of the same table has the names and hexadecimal codes of each color.
Example: background-color: #ADFF2F has the same effect as background-color: Greenyellow
Just look for the nearest color to the hexadecimal code mentioned and replace it with the name of the color in question.
But GreenYellow
has more characters than #ADFF2F
I thought when he talks about simplifying he was referring to the syntax aiming to facilitate the use of a color and not with respect to the amount of characters.
Is that he explains it in the comments.
Browser other questions tagged html css layout
You are not signed in. Login or sign up in order to post.
Define simplify.
– OnoSendai
A smaller number for the same color!
– alexjosesilva
for the top tag I’m testing this #F60 or # f6a0
– alexjosesilva
#f6a0
is an invalid format for color setting, or 8 bits per color (#RRGGBB
) or 4 (#RGB
). Maybe it’s interpreted as (#RGBA
), which would make the colour transparent (alpha = 0)– OnoSendai
What is the use of having a slightly smaller code?
– Maniero