Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emotional Ties #2

Open
Knar33 opened this issue Nov 23, 2018 · 0 comments
Open

Emotional Ties #2

Knar33 opened this issue Nov 23, 2018 · 0 comments

Comments

@Knar33
Copy link
Owner

Knar33 commented Nov 23, 2018

Top 2 emotions could be blended together based on their percentages. Right now if one emotion is just slightly above the other, the color will be that emotion. There is no in-between colors for when the API is not really sure which emotion is displayed. The color displayed should be somewhere between the top two, based on the % of each.

For example, if Sadness is at 40% and Anger is at 30%, the total percent would be 70%. 40/70 = 0.57, so the colors will be 50% between sadness and anger. Sadness is [0,0,255] and anger is [255,0,0].

The difference would be calculated between the two [255, 0, -255] and the multiplier multiplied [102, 0, -102] . Then that number would be added/subtracted [102, 0, 153]. This is now 40% between Sadness and Anger.

In order to accomplish this, the RGB color values will probably need to be passed directly into the Arduino, instead of passing the emotion value between 1-7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant