CoronaSDK: set default background color ( Corona RGB vs Windows RGB )

Trabla: CoronaSDK: set default background color ( Corona RGB vs Windows RGB )


CoronaSDK: set default background color ( Corona RGB vs Windows RGB )

Corona SDK is a software development kit (SDK) developed by Corona Labs Inc. Corona SDK allows software programmers to build mobile applications for iOS, Android, and Kindle, desktop applications for Windows and OS X, and connected TV applications for Apple TV and Android TV. Corona uses integrated Lua layered on top of C++/OpenGL to build graphic applications. The software has two subscription tiers: the free Corona SDK and the paid Corona Enterprise. A Corona Enterprise subscription adds the ability to use native code in app development


Solving:



Watch on YouTube


CoronaSDK RGB model - values  0...1
Windows RGB model - values 0...255

To convert windows RGB to corona RGB -  value / 255 !!!!

Example code:

function rgb( value )
 return value / 255
end

display.setDefault( "background", rgb(182), rgb(255), rgb(0) ) 

Corona SDK is a software development kit (SDK) developed by Corona Labs Inc. Corona SDK allows software programmers to build mobile applications for iOS, Android, and Kindle, desktop applications for Windows and OS X, and connected TV applications for Apple TV and Android TV.





No comments:

Post a Comment