object:setEmbossColor()

Type Function
Object DisplayObject
Library display.*
Return value none
Revision Release 2024.3703
Keywords setEmbossColor, text, color
See also display.newEmbossedText()

Overview

Sets the color parameters for an embossed text object created via display.newEmbossedText().

Syntax

object:setEmbossColor( colorTable )
colorTable (required)

Table. A table which must include two named sub-tables for the highlight and shadow of the embossed text object. Each of these tables should contain the RGB+A color values for the respective property.

Example

local myText = display.newEmbossedText( "hello", 200, 100, native.systemFont, 40 )
myText:setFillColor( 0.5 )
myText:setText( "Hello World!" )

local color = 
{
    highlight = { r=1, g=1, b=1 },
    shadow = { r=0.3, g=0.3, b=0.3 }
}
myText:setEmbossColor( color )