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

[read-only] chrome : bool

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


[read-only] color : color

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


[read-only] glitter : bool

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


[read-only] id : int

The BrickLink id of this color.


[read-only] isNull : bool

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.


[read-only] ldrawId : int

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


[read-only] metallic : bool

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


[read-only] milky : bool

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


[read-only] modulex : bool

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


[read-only] name : string

The BrickLink name of this color.


[read-only] popularity : real

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.


[read-only] solid : bool

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


[read-only] speckle : bool

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


[read-only] transparent : bool

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-2024 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.