100% black text window

Cap_

Dude
Member
Joined
Apr 1, 2019
Messages
23
Reaction score
1
First Language
English
Primarily Uses
RMVXA
I'm looking for a way to make the text window completely black. Every time I set all the colors to -255 the window still has background lines and it's slightly transparent.
 

Tw0Face

Chief Executive Officer
Veteran
Joined
Nov 12, 2018
Messages
326
Reaction score
337
First Language
German
Primarily Uses
RMVXA
Code:
#===========================================================================
# Window Color Opacity - v1.0
# Author: Melkino
#===========================================================================

$imported = {} if $imported.nil?
$imported["MK-WindowOpacity"] = true

#-------------------------------------------------------------------------
# ▼ About
#-------------------------------------------------------------------------
# This script lets you change the opacity of the colored portion of game
# windows. Window borders are unaffected, though.
#
#-------------------------------------------------------------------------
# ▼ Installation
#-------------------------------------------------------------------------
# Paste below Materials and above Main.
#
#-------------------------------------------------------------------------
# ▼ Updates
#-------------------------------------------------------------------------
# May 9, 2012 - Started & finished script
#
#-------------------------------------------------------------------------

class Window_Base < Window

module MK_WIN_OPA
 
    # Input a value between 0-255.
    # 0 makes windows fully transparent, while 255 makes them opaque.
    OPACITY = 255
 
end #module
 
#===========================================================================
#  Customization ends here.
#===========================================================================

  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
 
  alias mk_initialize initialize
  def initialize(x, y, width, height)
    super
    self.windowskin = Cache.system("Window")
    self.back_opacity = MK_WIN_OPA::OPACITY
    update_padding
    update_tone
    create_contents
    @opening = @closing = false
  end
 
end # class
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,239
Reaction score
6,783
First Language
German
Primarily Uses
RMMV
Every time I set all the colors to -255
you don't set the color to -255, you set a tint to -255.

color codes are between 0 and 255 only, it is absolutely impossible to have a color with a negative value.
tinting is a mathematical operation of adding a value to a color to calculate a new color. That is why you can add a negative number to a color code to reduce that color code, but it will never go below 0. (0,0,0 is the RGB color code for black).

If you get something other than black after tinting with -255, then you have another color mathematic operation elsewhere to add to the original color, and if that other operation has a higher priority, then the -255 can be overridden.

If using the code above does not work, you need to find that other color influence and reduce it, and to help you with that we would have to know where you did what.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Trading has been halted on the TSX (Canadian stock market) because of "technical issues". Suspicious... I'm bracing myself for a sea of red tomorrow lol
The Loco-Motion song pre-dates the dance. Meaning the lyrics are kinda misleading. "Everybody's doing a brand new dance now"... No they weren't, you just used peer pressure to trick everyone into going along with it.
Love it when someone confuses "RPG Maker (or script/plugin) has a bug" with "I didn't set it up right and it's not working as I want (or gives an error)"
Is animation really as hard as I think it is?
Out of sudden, snow. Everywhere.

Forum statistics

Threads
94,579
Messages
922,046
Members
124,446
Latest member
chungagunga
Top