Class: Color

Color(dataopt)

Represents a color object

Constructor

new Color(dataopt)

Create a new instance of a color
Parameters:
Name Type Attributes Description
data object <optional>
API response data.
Properties
Name Type Attributes Default Description
color_id number <optional>
0 The color id. i.e. - 10
color_name string <optional>
The color name. i.e. - Dark Gray
color_code string <optional>
The HTML HEX associated to the color. i.e. - 6b5a5a
color_type string <optional>
A group that the color belongs to. i.e. - Solid, Transparent, etc...
Source:

Classes

Color

Members

color_code :string

Type:
  • string
Source:

color_id :number

Type:
  • number
Source:

color_name :string

Type:
  • string
Source:

color_type :string

Type:
  • string
Source:

Methods

(static) all() → {BricklinkRequest}

Get a list of all colors Usage: ``` var req = Color.all(); client.send(req).then(colors => console.log(colors)); ```
Source:
Returns:
A request that resolves to an array of Color.
Type
BricklinkRequest

(static) get(colorId) → {BricklinkRequest}

Method to get specific color details Usage: ``` var req = Color.get(10); client.send(req).then(color => console.log(color)); ```
Parameters:
Name Type Description
colorId number a color id.
Source:
Returns:
A request that resolves to a Color instance.
Type
BricklinkRequest