Method Image.Color.Color()->name()


Method hex
Method name
Method html

string hex()
string hex(int n)
string name()
string html()

Description

Information methods.

hex() simply gives a string on the #rrggbb format. If n is given, the number of significant digits is set to this number. (Ie, n=3 gives #rrrgggbbb.)

name() is a simplified method; if the color exists in the database, the name is returned, per default is the hex() method use.

html() gives the HTML name of the color, or the hex(2) if it isn't one of the 16 HTML colors.

Returns

a new Image.Color.Color object

See also

rgb, hsv, Image.Color