Welcome Guest, Not a member yet? Register   Sign In
Colour Helper
#1

[eluser]Sverri[/eluser]
I thought I would throw these functions out here.

If you have any comments or the like then I would be glad to hear what you have to say.
#2

[eluser]Basketcasesoftware[/eluser]
Looks very good. At least in the function names you spell the word right :cheese:

How comprehensive is that list of color names? Didn't seem all that large.
#3

[eluser]Sverri[/eluser]
Yeah it was quite a balancing act. I was taught to use proper English when writing prose, but in the context of programming American seems more appropriate for some reason.

I stole the list of colours from the CSS Color Module Level 3 recommendation (http://www.w3.org/TR/css3-color/#svg-color). Adding more would not be very helpful, because most browsers would most likely not recognize them.
#4

[eluser]InsiteFX[/eluser]
Did you have a look at these functions on PHP.net?
Code:
// Returns a string containing a hexadecimal representation of the given number argument.
// The largest number that can be converted is 4294967295 in decimal resulting
// to "ffffffff".
string dechex ( int $number )

// and this one.
// Returns the decimal equivalent of the hexadecimal number represented by the hex_string
// argument. hexdec() converts a hexadecimal string to a decimal number.
number hexdec ( string $hex_string )

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB