Small Basic Forum
Challenge 14 - Rainbow - Printable Version

+- Small Basic Forum (https://litdev.uk/mybb)
+-- Forum: Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=1)
+--- Forum: Challenges (https://litdev.uk/mybb/forumdisplay.php?fid=5)
+--- Thread: Challenge 14 - Rainbow (/showthread.php?tid=491)



Challenge 14 - Rainbow - litdev - 09-15-2025

Write a program to draw a rainbow in the GraphicsWindow.


RE: Challenge 14 - Rainbow - martmen - 09-16-2025

Hello Small Basic fans,

here is my rainbow FZSV873.000.

Description:
  • This program draws six overlapping ellipses in different pastel colors to simulate a rainbow.
  • The ellipses are centered horizontally and stacked vertically with increasing size.
  • The last color blends into the background, creating a smooth fade-out effect.

Best regards
martmen

   


RE: Challenge 14 - Rainbow - litdev - 09-16-2025

Nice effect, isn't red on the outer and violet on the inner edge.


RE: Challenge 14 - Rainbow - martmen - 09-18-2025

Hello LitDev,
You're right — the colors of a rainbow are different. Here's an example with the correct color selection and order.

FZSV873.000-0

I had the color choices created by Copilot.

See you soon,
martmen


RE: Challenge 14 - Rainbow - martmen - 09-18-2025

Hello everyone,

In version FZSV873.000-0, I find the colors too bright. I'm providing version FZSV873.000-1 instead. This version uses shapes with increased transparency.

See you soon,
martmen


RE: Challenge 14 - Rainbow - martmen - 09-20-2025

Hello friends of the rainbow,

here is my new version FZSV873.000-2. In this version, commands from the LitDev extension are used.
At the beginning of the program, there are three variables that are assigned values. These can be used to change the appearance of the rainbow.

Have fun experimenting!
martmen