Prevent "Fit to Window" setting
You can try with below Jquery snippet.

(function ($) {
var cboxOptions = {
     width: '95%',
     height: '95%',
     maxWidth: '768px',
     maxHeight: '768px',
}

$('#colorbox').colorbox(cboxOptions);

$(window).resize(function(){
   $.colorbox.resize({
     width: window.innerWidth &gt; parseInt(cboxOptions.maxWidth) ? cboxOptions.maxWidth : cboxOptions.width,
         height: window.innerHeight &gt; parseInt(cboxOptions.maxHeight) ? cboxOptions.maxHeight : cboxOptions.height
   });
});