![]() |
Hex Color Codes - Hex 6 <=> Hex 3
Hi All,
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. Thanks Luke |
Re: Hex Color Codes - Hex 6 <=> Hex 3
Previously in alt.html, <lucanos@gmail.com> said:
> Or should I simply use basic rounding to change Hex6 to Hex3 (ie > #A1B7C9 becomes #ABD). Any 3-digit value can be expressed as a 6-digit value, e.g. #ABD is equivalent to #AABBDD. Most 6-digit values cannot be expressed in 3-digits though. For #A1B7C9, #ABD is probably the closest, but the 2 colours are significantly different. http://clarkecomputers.com.au/usenet/hex.html > I'm just trying to tweak a CSS'd set of pages, and the previous > developer had a penchant for the shorter color codes. As above, converting from 3 to 6 is easy - just duplicate each of the 3 digits. -- Mark Parnell http://www.clarkecomputers.com.au alt.html FAQ :: http://html-faq.com/ |
Re: Hex Color Codes - Hex 6 <=> Hex 3
Thanks Mark,
I thought that was the case, but always better to have my assumptions approved by those who know best. Thanks again, Luke |
Re: Hex Color Codes - Hex 6 <=> Hex 3
> From: lucanos@gmail.com
> 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 |
Re: Hex Color Codes - Hex 6 <=> Hex 3
dorayme wrote:
>>From: lucanos@gmail.com > > >>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). This would _only_ matter in photo retouching, digital imaging, and the like. Designing pages with backgrounds and foregrounds from three hex integers provides more than enough colors. I find it also makes it easier to tweak the colors -- to find combinations I like without resorting to a color chart. -- mbstevens http://www.mbstevens.com/cgi/mkatt.p...ique_Generator |
Re: Hex Color Codes - Hex 6 <=> Hex 3
> From: mbstevens <NOXwebmasterx@xmbstevensx.com>
> > dorayme wrote: >>> From: lucanos@gmail.com >> >>> 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). >>> >> >> 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). > > This would _only_ matter in photo retouching, digital imaging, > and the like. Designing pages with backgrounds and foregrounds > from three hex integers provides more than enough colors. I > find it also makes it easier to tweak the colors -- to find > combinations I like without resorting to a color chart. > -- I, too, tend to only use the 3 hex lot. But this may not suit everyone. I have fancied that I can't *always* get what I want in 3 and so use 6 now and then. But this may be a simple conceit. Every person needs some to have the pride to go on. dorayme |
Re: Hex Color Codes - Hex 6 <=> Hex 3
lucanos@gmail.com wrote:
> Hi All, > > 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). Actually, #9BC would be closer. > I'm just trying to tweak a CSS'd set of pages, and the previous > developer had a penchant for the shorter color codes. Unless there is a direct translation (e.g., #336699 = #369), I personally wouldn't muck with the color codes. Those few extra bytes of info aren't likely going to affect anything. -- *** Remove the DELETE from my address to reply *** ================================================== ==== Kevin Scholl http://www.ksscholl.com/ kscholl@comcast.DELETE.net ------------------------------------------------------ Information Architecture, Web Design and Development ------------------------------------------------------ We are the music makers, and we are the dreamers of the dreams... ================================================== ==== |
Re: Hex Color Codes - Hex 6 <=> Hex 3
With neither quill nor qualm, Kevin Scholl quothed:
> > Or should I simply use basic rounding to change Hex6 to Hex3 (ie > > #A1B7C9 becomes #ABD). > > Actually, #9BC would be closer. How do you figure that? -- Neredbojias Contrary to popular belief, it is believable. |
Re: Hex Color Codes - Hex 6 <=> Hex 3
With neither quill nor qualm, dorayme quothed:
> >> 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). > > > > This would _only_ matter in photo retouching, digital imaging, > > and the like. Designing pages with backgrounds and foregrounds > > from three hex integers provides more than enough colors. I > > find it also makes it easier to tweak the colors -- to find > > combinations I like without resorting to a color chart. > > -- > > > I, too, tend to only use the 3 hex lot. But this > may not suit everyone. I have fancied that I > can't *always* get what I want in 3 and so use 6 > now and then. But this may be a simple conceit. > Every person needs some to have the pride to go > on. Every person needs some for simple contentment. -- Neredbojias Contrary to popular belief, it is believable. |
Re: Hex Color Codes - Hex 6 <=> Hex 3
Neredbojias wrote:
> With neither quill nor qualm, dorayme quothed: > > >>>>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). >>> >>>This would _only_ matter in photo retouching, digital imaging, >>>and the like. Designing pages with backgrounds and foregrounds >>>from three hex integers provides more than enough colors. I >>>find it also makes it easier to tweak the colors -- to find >>>combinations I like without resorting to a color chart. >>>-- >> >> >>I, too, tend to only use the 3 hex lot. But this >>may not suit everyone. I have fancied that I >>can't *always* get what I want in 3 and so use 6 >>now and then. But this may be a simple conceit. >>Every person needs some to have the pride to go >>on. > > > Every person needs some for simple contentment. Hoare's Law: "Inside every large program is a small program struggling to get out." C.A.R. Hoare (I think it applies to CSS markup, too. Go baroque and you'll go broke.) -- mbstevens http://www.mbstevens.com/cgi/mkatt.p...ique_Generator (New version 1.2 with macros.) |
| All times are GMT. The time now is 11:05 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.