Color QML Type

This value type represents a BrickLink color. More...

Import Statement: import BrickLink 1.0

Properties

Methods

Detailed Description

Each color in the BrickLink catalog is available as a Color object.

You cannot create Color objects yourself, but you can retrieve a Color object given the id via the various BrickLink::color() overloads and BrickLink::colorFromLDrawId().

See https://www.bricklink.com/catalogColors.asp

Property Documentation

chrome : bool [read-only]

Returns true if this color is chrome-like, or false otherwise.


color : color [read-only]

Returns the RGB value of this BrickLink color as a basic QML color type.


glitter : bool [read-only]

Returns true if this color is glittery, or false otherwise.


id : int [read-only]

The BrickLink id of this color.


isNull : bool [read-only]

Returns whether this Color is null. Since this type is a value wrapper around a C++ object, we cannot use the normal JavaScript null notation.


ldrawId : int [read-only]

The LDraw id of this color, or -1 if there is no match or if a LDraw installation isn't available.


metallic : bool [read-only]

Returns true if this color is metallic, or false otherwise.


milky : bool [read-only]

Returns true if this color is milky, or false otherwise.


modulex : bool [read-only]

Returns true if this color is a Modulex color, or false otherwise.


name : string [read-only]

The BrickLink name of this color.


popularity : real [read-only]

Returns the popularity of this color, normalized to the range [0 .. 1]. The raw popularity value is derived from summing up the counts of the Parts, In Sets, Wanted and For Sale columns in the BrickLink Color Guide table.


solid : bool [read-only]

Returns true if this color is a solid color, or false otherwise.


speckle : bool [read-only]

Returns true if this color is speckled, or false otherwise.


transparent : bool [read-only]

Returns true if this color is transparent, or false otherwise.


Method Documentation

image sampleImage(int width, int height)

Returns an image of this color, sized width x height.


© 2004-2025 Robert Griebl. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. All trademarks are property of their respective owners.