#[repr(C)]
pub struct QColor { /* private fields */ }
Expand description

The QColor class provides colors based on RGB, HSV or CMYK values.

Note that we only expose RGB methods for now.

Implementations

Returns the alpha color component of this color.

Returns the blue color component of this color.

Returns the green color component of this color.

Returns the red color component of this color.

Sets the alpha of this color to alpha. Integer alpha is specified in the range 0-255.

Sets the blue color component of this color to blue. Integer components are specified in the range 0-255.

Sets the green color component of this color to green. Integer components are specified in the range 0-255.

Sets the red color component of this color to red. Integer components are specified in the range 0-255.

Constructs a QColor with the RGB value r, g, b, and the alpha-channel (transparency) value of a.

The color is left invalid if any of the arguments are invalid.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Constructs an invalid color. An invalid color is a color that is not properly set up for the underlying window system.

The alpha value of an invalid color is unspecified.

A type-level representation of the type’s C++ namespace and type name. Read more

Constructs a QVariant from a reference of $typeName

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.