diff --git a/my-listings.sty b/my-listings.sty
index 05bd7e717685359274709dc76de712f056a25ba6..9a0b6977e358a563d7812e5b157869a50a2f498d 100644
--- a/my-listings.sty
+++ b/my-listings.sty
@@ -6,11 +6,9 @@
                  LaTeX package for listings configuration]
 
 % options
-\def\@colorlst{}
-\DeclareOption{colors}{
-  \def\@colorlst{true}
-}
+\newif\if@lstcolors \@lstcolorstrue
 
+\DeclareOption{nocolors}{\@lstcolorsfalse}
 \ProcessOptions\relax
 
 % LuaLaTeX
@@ -238,17 +236,24 @@
       }
 }
 
-\ifx@colorlst\@empty
-\relax
-\else
+% \if@lstcolors
+% \makeatletter
+% \@ifclassloaded{beamer}{%
+%   \mode<presentation>{\lstusecolors}%
+%   \ifx\slideshandout\undefined\mode<handout>{\lstusecolorshandouts}\else\relax\fi%
+% }{%
+% \lstusecolors%
+% }%
+% \makeatother
+% \else%
+% \lstusecolors%
+% \fi
+% \fi
+
 \makeatletter
-\@ifclassloaded{beamer}{%
-  \mode<presentation>{\lstusecolors}%
-  \ifx\slideshandout\undefined\mode<handout>{\lstusecolorshandouts}\else\relax\fi%
-}{%
+\if@lstcolors
 \lstusecolors%
-}%
-\makeatother
 \fi
+\makeatother
 
 \endinput
\ No newline at end of file