To create gradient text in corona, you have to download ‘Corona daily build 612’ which has functions like setFillColor() etc.
You create a new gradient object by calling graphics.newGradient().
You can pass (and reuse) the object in calls to text:setTextColor() and rect:setFillColor().

Here is an example.

local myText =
    display.newText( "Hello, World!", 0, 0, native.systemFont, 40 )
myText.x = display.contentWidth * 0.5
myText.y = display.contentWidth * 0.25
local g = graphics.newGradient( { 180, 180, 0 }, { 255 }, "down" )
myText:setTextColor( g )


Leave a Reply

Your email address will not be published. Required fields are marked *




Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.