On Android, to be able to customize the style, you need to have access to the react native android folder
...
<style name="primaryColorStyle" parent="Theme.MaterialComponents.DayNight.NoActionBar">
<item name="colorPrimary">#f43d2f</item>
</style>
<?xml version="1.0" encoding="utf-8"?>
<resources>
...
<color name="defaultFeedbackStyle">#80FF6E</color>
<color name="successFeedbackStyle">#B0F1FF</color>
<color name="errorFeedbackStyle">#667818</color>
</resources>
import React from 'react';
import { Platform } from 'react-native';
import {
useDocumentDetector,
} from '@caf.io/react-native-document-detector';
export default function App() {
const {
result,
error,
cancelled,
} = useDocumentDetector({
style: {
primaryColor: Platform.OS === 'android' ? 'primaryColorStyle' : '#f43d2f',
feedbackColors: {
defaultColor: Platform.OS === 'android' ? 'defaultFeedbackStyle' : '#80FF6E',
successColor: Platform.OS === 'android' ? 'successFeedbackStyle' : '#B0F1FF',
errorColor: Platform.OS === 'android' ? 'errorFeedbackStyle' : '#667818',
},
},
});
return (
...
);
}