Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
Documentation
SDLRGBColor

SDLRGBColor Class Reference

Section Contents

Overview

Represents an RGB color

@since 5.0

-initWithRed:green:blue:

Create an SDL color object with red / green / blue values between 0-255

Objective-C

- (nonnull instancetype)initWithRed:(UInt8)red
                              green:(UInt8)green
                               blue:(UInt8)blue;

Swift

init(red: UInt8, green: UInt8, blue: UInt8)

Parameters

red

The red value of the color

green

The green value of the color

blue

The blue value of the color

Return Value

The color

-initWithColor:

Create an SDL color object with a UIColor object.

Warning

The alpha color of the UIColor object will be ignored

Objective-C

- (nonnull instancetype)initWithColor:(nonnull UIColor *)color;

Swift

init(color: UIColor)

Parameters

color

The UIColor object to base this color on

Return Value

The color

red

The red value of the RGB color Required, Integer, 0-255

Objective-C

@property (nonatomic, copy) NSNumber<SDLInt> *_Nonnull red;

Swift

@NSCopying var red: NSNumber & SDLInt { get set }

green

The green value of the RGB color Required, Integer, 0-255

Objective-C

@property (nonatomic, copy) NSNumber<SDLInt> *_Nonnull green;

Swift

@NSCopying var green: NSNumber & SDLInt { get set }

blue

The blue value of the RGB color Required, Integer, 0-255

Objective-C

@property (nonatomic, copy) NSNumber<SDLInt> *_Nonnull blue;

Swift

@NSCopying var blue: NSNumber & SDLInt { get set }
View on GitHub.com
Previous Section Next Section