12 Questions
What is the range of values for the red, green, and blue components in a color?
Between 0 and 255 inclusive
What is the purpose of the opacity parameter in graphics?
To control the transparency of a shape
What is the difference between a radial gradient and a linear gradient?
A radial gradient fades from the center of the shape outwards, while a linear gradient fades from one corner or edge to the other
What is the purpose of the bold
and italic
parameters in the Label
function?
To control the font style of the label
What is the difference between a RegularPolygon
and a Star
?
A RegularPolygon
has equal sides and angles, while a Star
has pointed vertices and can be more or less rounded
How can you create a polygon with custom vertices?
By using the Polygon
function and specifying the coordinates of the vertices in order
What is the default fill color for a shape drawn using the Rect
function?
black
How can you draw a rectangle with no fill color?
By setting fill=None
What is the default border width for a shape drawn using the Rect
function?
2
How can you draw a rectangle with a dashed border of length 3 pixels and gaps of length 2 pixels?
By setting dashes=(3, 2)
What is the purpose of the borderWidth
parameter in the Rect
function?
To specify the width of the border
How can you use a custom RGB color to fill a shape?
By using rgb(red, green, blue)
Test your understanding of CSS gradients, including radial and linear gradients, and opacity. Learn how to create stunning visual effects with CSS.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free