SceneView / sceneview-android

SceneView is a 3D and AR Android Composable and View with Google Filament and ARCore. This is a Sceneform replacement in Kotlin
Apache License 2.0
849 stars 161 forks source link

Incorrect background color of the View added as a renderable to the ViewNode #560

Open GenChe opened 1 month ago

GenChe commented 1 month ago

I am using branch (feat/ar_view_node_sample, PR #525) which is now merged yet. And want to use custom background color for the view. For some reason color is not correct. The blue color turns purple.

samples/ar-view-node/src/main/res/values/colors.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="black">#FF000000</color>
    <color name="white">#FFFFFFFF</color>
    <color name="gray_500">#9E9E9E</color>
    <color name="blue_gray_500">#607D8B</color>
    <color name="main_color">#FFBB86FC</color>
    <color name="btn_pressed_color">#FF6200EE</color>
    <color name="red_500">#F44336</color>
    <color name="blue">#0000FF</color> // new color
</resources>

samples/ar-view-node/src/main/res/drawable/rectangle_rounded_corner.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@color/blue"/>
    <corners android:radius="10dp"/>
</shape>

Screenshot_20240926_114655_SceneViewSample

Any help is very welcome! Thanks!