Re: Color Class
| From: | Tomas V.V.Cox | Date: | Mon, 26 Nov 2001 02:09:31 +0000 |
| Subject: | Re: Color Class | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-3087@lists.php.net to get a copy of this message | ||
Jason Lotito wrote:
>
>
> Last night on #php on OPN, someone came in and was asking about Color
> Mixing. Basically, was there a PHP class or function or something that
> you could enter lets say #336699 and #ffffff into and it would return
> the correctly mixed color.
>
>
> It can be found here: $ ɺ
> ŠÔO=%±õV/žhttp://dev.newbienetwork.net/class.colors.php
>
> Other ideas I had are:
>
> Get text color: Enter a color and it returns either a light or dark
> color to be best viewed. Already implemented and used.
>
> Make web safe: make all returned colors websafe colors. This class
> shouldn't be restricted to web colors only (PHP-GTK user may want to use
> it, though I don't know in what capacity) but the option should be
> there. I have started to implement think on this ( hence the unused
> $websafe array in the class )
>
> Other ideas, suggestion? I know this probably isn't as big as the
> Metabase Adoption topic or the 54th Monthly Spaces v.s. Tabs debate, but
> hey, at least it's a colorful topic (bad pun intended).
>
We have some other color helper functions that can be added here:
rgb2hex y hex2rgb.
Tomas V.V.Cox