Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLRGBColor Class Reference

Section Contents

Overview

Undocumented

-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 (readwrite, copy, nonatomic) 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 (readwrite, copy, nonatomic) 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 (readwrite, copy, nonatomic) NSNumber<SDLInt> *_Nonnull blue;

Swift

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