Color QML Type
This value type represents a BrickLink color. More...
Import Statement: | import BrickLink 1.0 |
Properties
- chrome : bool
- color : color
- glitter : bool
- id : int
- isNull : bool
- ldrawId : int
- metallic : bool
- milky : bool
- modulex : bool
- name : string
- popularity : real
- solid : bool
- speckle : bool
- transparent : bool
Methods
- image sampleImage(int width, int height)
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 |
Returns true
if this color is chrome-like, or false
otherwise.
color : color |
Returns the RGB value of this BrickLink color as a basic QML color type.
glitter : bool |
Returns true
if this color is glittery, or false
otherwise.
id : int |
The BrickLink id of this color.
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.
ldrawId : int |
The LDraw id of this color, or -1
if there is no match or if a LDraw installation isn't available.
metallic : bool |
Returns true
if this color is metallic, or false
otherwise.
milky : bool |
Returns true
if this color is milky, or false
otherwise.
modulex : bool |
Returns true
if this color is a Modulex color, or false
otherwise.
name : string |
The BrickLink name of this color.
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.
solid : bool |
Returns true
if this color is a solid color, or false
otherwise.
speckle : bool |
Returns true
if this color is speckled, or false
otherwise.
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-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.