Show / Hide Table of Contents

Class SkinColor

Inheritance
System.Object
SkinColor
Namespace: Content.Shared.Humanoid
Assembly: Content.Shared.dll
Syntax
public static class SkinColor : object

Fields

| Improve this Doc View Source

MaxTintedHuesSaturation

Declaration
public const float MaxTintedHuesSaturation = null
Field Value
Type Description
System.Single
| Improve this Doc View Source

MinTintedHuesLightness

Declaration
public const float MinTintedHuesLightness = null
Field Value
Type Description
System.Single

Properties

| Improve this Doc View Source

ValidHumanSkinTone

Declaration
public static Color ValidHumanSkinTone { get; }
Property Value
Type Description
Color

Methods

| Improve this Doc View Source

HumanSkinTone(Int32)

Get a human skin tone based on a scale of 0 to 100. The value is clamped between 0 and 100.

Declaration
public static Color HumanSkinTone(int tone)
Parameters
Type Name Description
System.Int32 tone

Skin tone. Valid range is 0 to 100, inclusive. 0 is gold/yellowish, 100 is dark brown.

Returns
Type Description
Color

A human skin tone.

| Improve this Doc View Source

HumanSkinToneFromColor(Color)

Gets a human skin tone from a given color.

Declaration
public static float HumanSkinToneFromColor(Color color)
Parameters
Type Name Description
Color color
Returns
Type Description
System.Single
Remarks

Does not cause an exception if the color is not originally from the human color range. Instead, it will return the approximation of the skin tone value.

| Improve this Doc View Source

TintedHues(Color)

Convert a color to the 'tinted hues' skin tone type.

Declaration
public static Color TintedHues(Color color)
Parameters
Type Name Description
Color color

Color to convert

Returns
Type Description
Color

Tinted hue color

| Improve this Doc View Source

ValidSkinTone(HumanoidSkinColor, Color)

Declaration
public static Color ValidSkinTone(HumanoidSkinColor type, Color color)
Parameters
Type Name Description
HumanoidSkinColor type
Color color
Returns
Type Description
Color
| Improve this Doc View Source

ValidTintedHuesSkinTone(Color)

Turn a color into a valid tinted hue skin tone.

Declaration
public static Color ValidTintedHuesSkinTone(Color color)
Parameters
Type Name Description
Color color

The color to validate

Returns
Type Description
Color

Validated tinted hue skin tone

| Improve this Doc View Source

VerifyHumanSkinTone(Color)

Verify if a color is in the human skin tone range.

Declaration
public static bool VerifyHumanSkinTone(Color color)
Parameters
Type Name Description
Color color

The color to verify

Returns
Type Description
System.Boolean

True if valid, false otherwise.

| Improve this Doc View Source

VerifySkinColor(HumanoidSkinColor, Color)

Declaration
public static bool VerifySkinColor(HumanoidSkinColor type, Color color)
Parameters
Type Name Description
HumanoidSkinColor type
Color color
Returns
Type Description
System.Boolean
| Improve this Doc View Source

VerifyTintedHues(Color)

Verify if this color is a valid tinted hue color type, or not.

Declaration
public static bool VerifyTintedHues(Color color)
Parameters
Type Name Description
Color color

The color to verify

Returns
Type Description
System.Boolean

True if valid, false otherwise

  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾