]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Fix too low contrast on new media modal background in web UI
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 7 Dec 2020 01:32:27 +0000 (02:32 +0100)
committerClaire <claire.github-309c@sitedethib.com>
Fri, 7 May 2021 20:47:09 +0000 (22:47 +0200)
Port 014733d1e4c54cd47d2afd361db26982f02166fd to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
app/javascript/flavours/glitch/components/modal_root.js

index 024adf5a1759c81665f924f61b6c116e1b8d996e..913234d3258139670f1edfafd604ebdb7733f500 100644 (file)
@@ -2,7 +2,7 @@ import React from 'react';
 import PropTypes from 'prop-types';
 import 'wicg-inert';
 import { createBrowserHistory } from 'history';
-import { normal } from 'color-blend';
+import { multiply } from 'color-blend';
 
 export default class ModalRoot extends React.PureComponent {
   static contextTypes = {
@@ -127,7 +127,7 @@ export default class ModalRoot extends React.PureComponent {
     let backgroundColor = null;
 
     if (this.props.backgroundColor) {
-      backgroundColor = normal({ ...this.props.backgroundColor, a: 1 }, { r: 0, g: 0, b: 0, a: 0.3 });
+      backgroundColor = multiply({ ...this.props.backgroundColor, a: 1 }, { r: 0, g: 0, b: 0, a: 0.7 });
     }
 
     return (