Wiki
Clone wikiCore / fill
Back to Beyond the Codea in-app reference
fill() function
Introduction
The 'Graphics' chapter of Codea's in-app reference documents most of the fill()
function. The function sets or returns the colour used:
- to fill shapes drawn with the
ellipse()
andrect()
functions; - to set the colour of text drawn with the
text()
function; and - to set the colours of all the vertices of meshes where they are not otherwise set.
The default fill() colour
The default fill()
colour is an opaque grey. For example:
function setup()
r, b, g, a = fill()
print(r, b, g, a) -- Outputs 127 127 127 255
fill(255, 0, 0, 255) -- Set fill colour to opaque red
end
Updated