# Yahoo! UI Library

### dom 2.8.0r4

Yahoo! UI Library > dom > YAHOO.util.Dom.Color
Search:
Filters Show Private Show Protected Show Deprecated

## Class YAHOO.util.Dom.Color

Add style management functionality to DOM.

### Properties

#### KEYWORDS - `Object`

Color keywords used when converting to Hex

#### re_hex - `private Regex`

Regex to parse #123456 formatted strings

#### re_hex3 - `private Regex`

Regex to parse #123 formatted strings

#### re_RGB - `private Regex`

Regex to parse rgb(0,0,0) formatted strings

### Methods

#### toHex

`void toHex ( val )`
Converts an rgb or color string to a hex string: #123456

Parameters:
  `val <String>` The string to convert to hex notation.

Returns: `void`

#### toRGB

`void toRGB ( val )`
Converts a hex or color string to an rgb string: rgb(0,0,0)

Parameters:
  `val <String>` The string to convert to RGB notation.

Returns: `void`

Copyright © 2009 Yahoo! Inc. All rights reserved.