[wp-trac] [WordPress Trac] #19100: Introduce esc_color()

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 1 12:43:39 UTC 2011


#19100: Introduce esc_color()
------------------------------------+------------------------------
 Reporter:  mfields                 |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  General                 |     Version:
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------------

Comment (by mfields):

 Great question! IMHO it might be a good idea to standardize on hexadecimal
 notation. Although it is still a rough draft, the WordPress Coding
 Standards for CSS currently states:

 {{{
 Use hex code for colors. Avoid RBG and uppercase, and shorten values when
 possible: #fff instead of #FFFFFF.
 }}}

 Also, I believe that the color-picker script bundled with core use hex
 colors.

 Personally, I've always tried to avoid using named values to define
 colors. The only valid reason to use decimal notation IMHO is to take
 advantage of the alpha channel in the RGBA color space. I do not believe
 that there is a currently a core-supported way of tweaking the alpha
 channel. If there is, It's been hiding from me all of this time :)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19100#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list