This has some examples and info on using it for sound
https://warcraft.wiki.gg/wiki/API_PlaySound
As to a colour alert, it depends on what you mean.
You could do something as simple as colourizing the text.
This can be done using hex code colouring when you set the text
eg |cAARRGGBBTextToDisplay|r
or for clarity and flexibility where ColorOn can be set to a different colour before setting the text.
Lua Code:
local ColorOn = "|cAARRGGBB"
local ColorOff = "|r"
f.Text:SetText(ColorOn .. "Text to Display" .. ColorOff)
Or you could add a texture to the frame holding the text and colourise that according to your needs
More Info :
https://warcraft.wiki.gg/wiki/API_Te...etColorTexture
Set the texture up at frame Creation time
Lua Code:
f.Color = f:CreateTexture(nil,"BACKGROUND") - Set to Background so that the text appears above it
f.Color:SetAllPoints()
Then, when you need to change it's color use this line
Lua Code:
f.Color:SetColorTexture(r, g, b, a) - Where r,g,b and a are values between 0 and 1.