title: How to display choiceType values in Symfony as Colors
body: <p>I want to save an integer value in database and display it as a color but I'm not finding the right way to make it.</p>
  
  <p>My Form looks like this one:</p>
  
  <pre><code>public function buildForm(FormBuilderInterface $builder, array $options): void
  {
      $builder-&gt;add('risk', ChoiceType::class, [
          'choices' =&gt; 
              'level.0' =&gt; 1,
              'level.1' =&gt; 2,
              'level.2' =&gt; 3,
              'level.3' =&gt; 4,
              'level.4' =&gt; 5
          ],
      ]);
  }
  </code></pre>
  
  <p>It should look like this form at the end:
  <a href="https://i.stack.imgur.com/LA4FF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LA4FF.png" alt="enter image description here"></a></p>