How to make a color array property for a shader?

I have a simple shader with a property for a color that can be modified in the properties window on a material. Check the code sample and the image for a reference.

How can I make an array of colors? I want to be able to specify any number of colors in an array on a material’s properties window.

CCEffect %{
  - passes:
    - vert: vs
      frag: fs
        - blend: true
        cullMode: none
        texture: { value: white }
        alphaThreshold: { value: 0.5 }
        color: { value: [1, 1, 1, 1], editor: { type: color }}

CCProgram vs %{
  // ...

CCProgram fs %{
  precision highp float;
  #include <alpha-test>
  #include <texture>

  in vec4 v_color;

  in vec2 v_uv0;
  uniform sampler2D texture;

  uniform Data
    vec4 color;

  void main()
    vec4 o = vec4(1, 1, 1, 1);

      CCTexture(texture, v_uv0, o);

    o *= v_color;


    gl_FragColor = o;


Not support array properties yet, you need to define a property for each color.

Ah, that’s unfortunate. Thanks for the response!

Would be nice if that would be added in the future. I was planning on making a shader for a gradient that would be able to have any amount of colors in it by grabbing a user defined array.