Skip to content

tes3uiColorPreview⚓︎

A widget containing properties specific to color previews.

This type inherits the following: tes3uiWidget

Properties⚓︎

alpha⚓︎

The current alpha value of the preview.

Returns:

  • result (number)

checkerboard⚓︎

Read-only. The checkerboard image used by the preview element.

Returns:

  • result (Image)

checkerSize⚓︎

Read-only. The size of individual square in the color preview image in pixels.

Returns:

  • result (integer, nil)

color⚓︎

The current color of the preview.

Returns:

  • result (ffiImagePixel)

darkGray⚓︎

Read-only. The color of darker squares in the color preview image.

Returns:


element⚓︎

Access back to the element this widget interface is for.

Returns:


height⚓︎

Read-only. The height of the individual preview element.

Returns:

  • result (integer)

image⚓︎

Read-only. The image used by the preview element.

Returns:

  • result (Image)

lightGray⚓︎

Read-only. The color of lighter squares in the color preview image.

Returns:


texture⚓︎

Read-only. The texture used by the preview element.

Returns:


width⚓︎

Read-only. The width of the individual preview element.

Returns:

  • result (integer)

Methods⚓︎

getAlpha⚓︎

Gets the current alpha value.

local alpha = myObject:getAlpha()

Returns:

  • alpha (number)

getColor⚓︎

Gets the current color of the preview.

local color = myObject:getColor()

Returns:


getColorAlpha⚓︎

Gets the current color and alpha.

local color, alpha = myObject:getColorAlpha()

Returns:


getRGBA⚓︎

Gets the current color and alpha in a single table.

local color = myObject:getRGBA()

Returns:


setColor⚓︎

Changes the color of this widget to given color.

myObject:setColor(newColor, alpha)

Parameters:

  • newColor (mwseColorTable, ffiImagePixel): The new color to set.
  • alpha (number): Default: 1. Alpha value to set.