---
title: Playground
description: Play with FragmentColor in this REPL environment.
---

## Try it out (coming soon)

If you are reading this, you arrived here in the very early days of development.

You will soon be able to play with the library in this REPL environment.

You can [follow the project on GitHub](https://github.com/vista-art/fragmentcolor) to stay tuned.

This is a test for the Repl component itself:

import Repl from "../../../components/Repl.astro";

<Repl initialCode={`// You can write code here and see the result in the right panel.

// Create gradient background
const gradient = ctx.createLinearGradient(0, 0, 200, 420);
gradient.addColorStop(0, 'cyan');
gradient.addColorStop(1, 'blue');
ctx.fillStyle = gradient;
ctx.fillRect(0, 0, 600, 420);

// Draw a rotating rectangle
ctx.save();
ctx.translate(180, 210);
ctx.rotate(Date.now() / 1000);
ctx.fillStyle = 'yellow';
ctx.fillRect(-50, -50, 100, 100);
ctx.restore();
`} />
