TinyLifeExampleMod/Api/TinyLife/Utilities/ColorScheme.md

2.7 KiB

ColorScheme

Namespace: TinyLife > Utilities

Assembly: Tiny Life.dll

Implements IReadOnlyCollection<Color>, IEnumerable<Color>, IEnumerable

Summary

A color scheme is a list of Microsoft.Xna.Framework.Color instances with which an object can be colored. By default, a set of color schemes exist (defined in this class), but new ones can be created easily using TinyLife.Utilities.ColorScheme.Create(System.Object[]).

Properties

Type Name Summary
Int32 Count Stores the amount of Microsoft.Xna.Framework.Color instances that are part of this color scheme
Color Item Returns the Microsoft.Xna.Framework.Color at the given index in this color scheme

Methods

Return Name Summary
IEnumerator<Color> GetEnumerator ( )

Static Fields

Type Name Summary
ColorScheme Bricks
ColorScheme Ceramics
ColorScheme Eyes
ColorScheme Flannel
ColorScheme Grays
ColorScheme Hair
ColorScheme Knit1
ColorScheme Knit2
ColorScheme Modern
ColorScheme Pastel
ColorScheme Plants
ColorScheme SimpleWood
ColorScheme Skin
ColorScheme WarmDark
ColorScheme White

Static Methods

Return Name Summary
ColorScheme Create ( Object[] ) Create a new color scheme from the given colors. The colors passed can be of type Microsoft.Xna.Framework.Color, System.Int32 or System.UInt32.
ColorScheme Load ( TextureRegion ) Loads a color scheme from the given texture region. Each pixel on the texture region is evaluated and any pixels with an alpha value greater than zero are added to the color scheme.