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

[Feature Request] Tonemap to a specific color code #21

Open
vevv opened this issue Jul 22, 2024 · 2 comments
Open

[Feature Request] Tonemap to a specific color code #21

vevv opened this issue Jul 22, 2024 · 2 comments

Comments

@vevv
Copy link

vevv commented Jul 22, 2024

It would be nice to be able to specify a target hex color code like in subtitle_tonemap, should be pretty easy to add (just split to R/G/B and calculate, e.g. #a7a7a7 -> 167/167/167 -> (167/255) * 100 -> 65%).

edit: It seems you have to use the main color's code instead of 255 (e.g. 204) works, and it's the same way Subtitle Edit's percentage works.

I guess you would need to find the brightest color present in the subtitles, use that as reference, and calculate a percentage off of that to change other colors.

@MonoS
Copy link
Owner

MonoS commented Jul 23, 2024

Hi @vevv, well, in reality is not that easy, subtitle_tonemap works on RGB while my tool works on the YUV palettes and to map quietvoid's functionality to mine i'd need to implement conversion and handling of YUV color or RGB color for the input parameters taking into account also BT709 or BT470BG matrix when doing the conversion, I'll think about it.

@vevv
Copy link
Author

vevv commented Jul 26, 2024

Wait, YUV? I thought the entire format is just RGB images, which is why HDR subs are just darker.

In any case, if you could get this implemented, it would be very much appreciated!

@vevv vevv changed the title Tonemap to a specific color code [Feature Request] Tonemap to a specific color code Oct 15, 2024
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

2 participants