Skip to content

Tweak mode issue with hex codes including transparency. #720

Closed
@processing-bot

Description

@processing-bot

Created by: sampottinger

Description

Love tweaks mode. Forgot how much I love it.

Anyway, I'm getting Syntax Error like Incomplete statement or extra code near ‘extraneous input 'A0' expecting ')'’? if there is a color with a transparent component included when running in tweaks mode.

Expected Behavior

Expected it to draw per usual. The same sketch will work correctly if run normally.

Current Behavior

The following will run normally but not in tweaks mode:

void setup() {
  size(250, 250);
}

void draw() {
  background(#FFFFFF);
  noStroke();
  fill(#C0A0A0A0);
  ellipse(50, 125, 200, 200);
  ellipse(200, 125, 200, 200);
}

Steps to Reproduce

  1. Include a color with a transparent component like #C0A0A0A0
  2. Run in tweaks mode.

Your Environment

This reproduces across operating systems.

Possible Causes / Solutions

I think it might be at https://github.com/processing/processing4/blob/main/java/src/processing/mode/java/tweak/SketchParser.java#L273.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions