Skip to content

[BUG] to_threejs creates an int as a color which is unusual for Python #99

@bernhard-42

Description

@bernhard-42

Description

Currently material.vis.to_threejs()["color"] is an int
Typically in Python rgb colors are 3-tuples r,g,b with each value in [0,1] or css like strings '#bfbfc4'

Steps to Reproduce

import stainless
print(stainless.vis.to_threejs()["color"])
# 12566468

Expected Behavior

import stainless
print(stainless.vis.to_threejs()["color"])
# (0.7490196078431373, 0.7490196078431373, 0.7686274509803922) or "'#bfbfc4'"

Actual Behavior

see above

Environment

any

Additional Context

No response

Possible Solution

No response

Changelog Category

Fixed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions