> From:
> Probably a simple question, but rest assured I have looked around for
> answers before trying to use this forum as my last resort.
> (No-one likes the RTFM directive...)
>
> I'm trying to translate the HTML Color Codes between the Hex 6 & Hex 3
> standards.
> Does anyone know of any online translators to do this?
> Or should I simply use basic rounding to change Hex6 to Hex3 (ie
> #A1B7C9 becomes #ABD).
>
> I'm just trying to tweak a CSS'd set of pages, and the previous
> developer had a penchant for the shorter color codes.
>
Don't use 3 for the mere sake of shorter colour css specification.
#XXYYZZ is the format of a class of so many colours. This format has a
shorthand of #XYZ. Within this class, the implication goes the other
way too. So one can expand #XYZ to #XXYYZZ.
If you want a larger class of colours, stick to 6. There is nothing
then to gain from 3ing colours that happen to be like #XXYYZZ and lots
to lose, namely a changing of actual colour when 3ing a colour like
#UVWXYZ by some rather arbitrary "rounding". There is unlikely to be a
logical way of doing this to preserve the approx colour without
reference to the colour itself and matching a "close enough" colour
between two sets of colour (in which one is a subset of the other).
dorayme